package org.peterbjornx.image;

/**
 * Created by IntelliJ IDEA.
 * User: PeterbjornX
 * Date: Apr 8, 2009
 * Time: 5:38:19 PM
 * Basic colour and pixel array math
 */
public class ColorUtil {

    public static int mixAlpha(int rgb,int a){
        return ( a << 24 ) + rgb;
    }

    public static int jagToARGB(int b,int[] palette){
        if (b == 0) {
            return mixAlpha(palette[b],0);
        }
        return mixAlpha(palette[b],0xFF);
    }

}
